bitkeeper revision 1.1256 (42416620txO4y-haxDQfKlP_6mTC8Q)
authormafetter@fleming.research <mafetter@fleming.research>
Wed, 23 Mar 2005 12:50:40 +0000 (12:50 +0000)
committermafetter@fleming.research <mafetter@fleming.research>
Wed, 23 Mar 2005 12:50:40 +0000 (12:50 +0000)
Prevent buddy-allocator merges across Xen/Domain zones boundary.

Signed-off-by: Keir Fraser <keir.fraser@cl.cam.ac.uk>
Signed-off-by: Michael A Fetterman <michael.fetterman@cl.cam.ac.uk>
xen/common/page_alloc.c

index ea81c9b0afc45280c2736d140a8d3be73b1e44f5..097008b9f3650ced7f4657703f3dbb32af756b3a 100644 (file)
@@ -403,6 +403,13 @@ void init_xenheap_pages(unsigned long ps, unsigned long pe)
 
     memguard_guard_range(__va(ps), pe - ps);
 
+    /*
+     * Yuk! Ensure there is a one-page buffer between Xen and Dom zones, to
+     * prevent merging of power-of-two blocks across the zone boundary.
+     */
+    if ( !IS_XEN_HEAP_FRAME(phys_to_page(pe)) )
+        pe -= PAGE_SIZE;
+
     local_irq_save(flags);
     init_heap_pages(MEMZONE_XEN, phys_to_page(ps), (pe - ps) >> PAGE_SHIFT);
     local_irq_restore(flags);